<html>
<head>
  <meta charset="UTF-8" />
  <script type="text/javascript" src="http://cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script>
  <script type="text/javascript">
	$(document).ready(function(){
	  $("a").click(function(event){
		event.preventDefault();
	  });
	});
  </script>
</head>
<body>
	<a href="http://w3school.com.cn/">W3School</a>
	<p>preventDefault() 方法将防止上面的链接打开 URL。</p>
</body>
</html>